package com.chang.bootplus.po;


import com.chang.bootplus.base.database.Page;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import springfox.documentation.spring.web.readers.operation.ParameterAggregator;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "商品添加", description = "第一次添加商品均需要传，后面添加同样的商品时，描述，价格，分类，状态，图片可以不传")
public class ProductPO {

    @ApiModelProperty(value = "商品名",example = "vivo手机x40",required = true)
    private String proname;

    @ApiModelProperty(value = "商品描述",example = "2021新款")
    private String message;

    @ApiModelProperty(value = "商品价格",example = "2999.99")
    private BigDecimal price;

    @ApiModelProperty("商品所属于的最低分类id")
    private Long categoryIdFour;

    @ApiModelProperty("商品所属于的三级分类id")
    private Long categoryIdThree;

    @ApiModelProperty("商品所属于的二级分类id")
    private Long categoryIdTwo;

    @ApiModelProperty("商品所属于的一级分类id")
    private Long categoryIdOne;

    @ApiModelProperty(value = "商家id",required = true)
    private Long userId;

    @ApiModelProperty(value = "商品卖一件所能得到的利润",example = "10.9",required = true)
    private BigDecimal profit;

    @ApiModelProperty(value = "商品状态 0为可卖 1为不可卖 因为商家可以设置不卖，当然也跟库存有关")
    private Integer proStatus;

    @ApiModelProperty(value = "每次的添加量",required = true)
    private Integer addCount;

    @ApiModelProperty(value =
            "商品详情(如手机的话显示具体型号，食物的话显示具体口味),录入即{型号:土豪金,内存：128GB},而这里录入时型号用1表示，内存用2表示所以即真正录入时为：{'0':'x40Plus','1':'128GB'}"
            ,required = true)
    private Map<Long,String> mapDetails;

    @ApiModelProperty(value = "商品图片")
    private List<String> listPictures;
}

